/**
 * 
 */
package instructions;
import dataCPU.*;
/**
 * @author dt08nu0
 *
 */
public class Copy implements Instruction {

	/**
	 * 
	 */
	Data data; 
	Address address;
	public Copy(Data data, Address address) {
		this.data=data;
		this.address=address;
	}

    public String toString() {
	return "CPY "+data.toString+" "+address.toString();
    }
	
	public Word execute(Memory memory, Integer programCounter){
	    programCounter++;
	    memory.write(address, data);
	}
}
